﻿using net8.Models.Upload;
using SqlSugar;

namespace net8.Models.XiTong
{
    /// <summary>
    /// 用户表
    /// </summary>
    public class XtUser : Base
    {
        public Guid? CompanyId { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; } = "";
        public string Password { get; set; } = "";
        public string MobilePhone { get; set; }
        public string UserEmail { get; set; }
        public int Sex { get; set; }
        public bool IsEnable { get; set; }
        public Guid LoginId { get; set; }
        [SugarColumn(OldColumnName = "user_avatar")]
        public Guid FileId { get; set; }

        [Navigate(NavigateType.OneToMany, nameof(XtUserRole.UserId))]
        public List<XtUserRole> RoleList { get; set; }

        [Navigate(NavigateType.OneToOne, nameof(FileId), nameof(UpFile.Id))]
        public UpFile Image { get; set; }
    }
}
